"rcfilters-view-tags-tooltip": "Filter results using edit tags",
"rcfilters-view-return-to-default-tooltip": "Return to main filter menu",
"rcfilters-liveupdates-button": "Live updates",
+ "rcfilters-liveupdates-button-title-on": "Turn off live updates",
+ "rcfilters-liveupdates-button-title-off": "Display new changes as they happen",
"rcnotefrom": "Below {{PLURAL:$5|is the change|are the changes}} since <strong>$3, $4</strong> (up to <strong>$1</strong> shown).",
"rclistfromreset": "Reset date selection",
"rclistfrom": "Show new changes starting from $2, $3",
"rcfilters-view-tags-tooltip": "Tooltip for the button that loads the tags view in [[Special:RecentChanges]]",
"rcfilters-view-return-to-default-tooltip": "Tooltip for the button that returns to the default filter view in [[Special:RecentChanges]]",
"rcfilters-liveupdates-button": "Label for the button to enable or disable live updates on [[Special:RecentChanges]]",
+ "rcfilters-liveupdates-button-title-on": "Title for the button to enable or disable live updates on [[Special:RecentChanges]] when the feature is ON.",
+ "rcfilters-liveupdates-button-title-off": "Title for the button to enable or disable live updates on [[Special:RecentChanges]] when the feature is OFF.",
"rcnotefrom": "This message is displayed at [[Special:RecentChanges]] when viewing recentchanges from some specific time.\n\nThe corresponding message is {{msg-mw|Rclistfrom}}.\n\nParameters:\n* $1 - the maximum number of changes that are displayed\n* $2 - (Optional) a date and time\n* $3 - a date\n* $4 - a time\n* $5 - Number of changes are displayed, for use with PLURAL",
"rclistfromreset": "Used on [[Special:RecentChanges]] to reset a selection of a certain date range.",
"rclistfrom": "Used on [[Special:RecentChanges]]. Parameters:\n* $1 - (Currently not use) date and time. The date and the time adds to the rclistfrom description.\n* $2 - time. The time adds to the rclistfrom link description (with split of date and time).\n* $3 - date. The date adds to the rclistfrom link description (with split of date and time).\n\nThe corresponding message is {{msg-mw|Rcnotefrom}}.",
'rcfilters-view-tags-tooltip',
'rcfilters-view-return-to-default-tooltip',
'rcfilters-liveupdates-button',
+ 'rcfilters-liveupdates-button-title-on',
+ 'rcfilters-liveupdates-button-title-off',
'rcfilters-other-review-tools',
'blanknamespace',
'namespaces',
// Parent
mw.rcfilters.ui.LiveUpdateButtonWidget.parent.call( this, $.extend( {
- icon: 'play',
label: mw.message( 'rcfilters-liveupdates-button' ).text()
}, config ) );
this.model.connect( this, { liveUpdateChange: 'onLiveUpdateChange' } );
this.$element.addClass( 'mw-rcfilters-ui-liveUpdateButtonWidget' );
+
+ this.setState( false );
};
/* Initialization */
};
/**
- * Respond to the 'live update' feature being turned on/off
+ * Set the button's state and change its appearance
*
* @param {boolean} enable Whether the 'live update' feature is now on/off
*/
- mw.rcfilters.ui.LiveUpdateButtonWidget.prototype.onLiveUpdateChange = function ( enable ) {
+ mw.rcfilters.ui.LiveUpdateButtonWidget.prototype.setState = function ( enable ) {
this.setValue( enable );
this.setIcon( enable ? 'stop' : 'play' );
+ this.setTitle( mw.message(
+ enable ?
+ 'rcfilters-liveupdates-button-title-on' :
+ 'rcfilters-liveupdates-button-title-off'
+ ).text() );
+ };
+
+ /**
+ * Respond to the 'live update' feature being turned on/off
+ *
+ * @param {boolean} enable Whether the 'live update' feature is now on/off
+ */
+ mw.rcfilters.ui.LiveUpdateButtonWidget.prototype.onLiveUpdateChange = function ( enable ) {
+ this.setState( enable );
};
}( mediaWiki ) );